package com.vict.util;

import java.util.Map;

public class HttpUtil {
    public static String post(String url, Map<String, Object> form){
        String res = cn.hutool.http.HttpUtil.post(url, form);
        return res;
    }
    public static String jsonPost(String url, String body){
        String res = cn.hutool.http.HttpUtil.post(url, body);
        return res;
    }

    public static String get(String url){
        String res = cn.hutool.http.HttpUtil.get(url);
        return res;
    }

    public static String get(String url, Map<String, Object> form){
        String res = cn.hutool.http.HttpUtil.get(url, form);
        return res;
    }

    public static void main(String[] args) throws InterruptedException {
        String s = get("https://quotes.sina.cn/cn/api/json_v2.php/CN_MarketDataService.getKLineData?symbol=sh600001&scale=240&datalen=1023");
        System.out.println(s);


    }
}
